<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StoreBlogPost extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return false;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name'=>'required',
            'logo'=>'required',
            'longitude'=>'required',
            'latitude'=>'required',
            'phone'=>'required',
            'status'=>'required',
        ];
    }
    public function messages()
    {
        return [
          'name.required'=>'门店名称不能为空',
            'logo.required'=>'门店图片不能为空',
            'latitude.required'=>'纬度不能为空',
            'longitude.required'=>'经度不能为空',
            'phone.required'=>'门店手机号不能为空',
            'status.required'=>'状态不能为空'
        ];
    }
}
